package com.xiashitech.agent.proxy.hutool;

import com.xiashitech.agent.cache.classloader.ClassLoaderCache;
import com.xiashitech.agent.config.StartConfig;

public class HashUtil {

    private static String className = "cn.hutool.core.util.HashUtil";

    public static int apHash(String str) {
        try {
            Class hashUtilClass = ClassLoaderCache.getLaunchClassLoader().loadClass(className);
            return (int)hashUtilClass.getMethod("apHash", String.class).invoke(null,str);
        } catch (Throwable e) {
            StartConfig.throwableStackPrinter(e);
        }
        return 0;
    }
}
